package com.yuliang.ai.controller;

import com.yuliang.ai.domain.Vo.UserInfoVo;
import com.yuliang.ai.service.UserInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Huangkai
 */
@Slf4j
@RestController
@RequestMapping("/userInfo")
public class UserInfoController {

    @Autowired
    UserInfoService userInfoService;

    @GetMapping("/getUserInfo")
    public String getUserInfo(@RequestParam(value = "token") String token) {
        UserInfoVo userInfoVo = new UserInfoVo();
        userInfoVo.setToken(token);
        return userInfoService.getUserInfo(userInfoVo);
    }
}
